package com.hskn.hss.module.sysDictType.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hskn.hss.module.sysDictType.entity.SysDictType;
import com.hskn.hss.module.sysDictType.mapper.ISysDictTypeMapper;
import com.hskn.hss.module.sysDictType.service.SysDictTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 字典类型表 服务实现类
 * </p>
 *
 * @author <a href="https://www.fengwenyi.com?code">zcy</a>
 * @since 2021-12-21
 */
@Service
public class SysDictTypeServiceImpl extends ServiceImpl<ISysDictTypeMapper, SysDictType> implements SysDictTypeService {
    /**
     * 按照名字查询
     * @param name
     * @return
     */
    @Override
    public SysDictType getSysDictTypeByName(String name){
        return getOne(new QueryWrapper<SysDictType>().lambda().eq(SysDictType::getDictName,name).last(" limit 1"));
    }
}
